Readme.txt
----------

This file explains the contents of this supplementary package to the paper `Understanding cash flow risk,’ by Gryglewicz, S., Mancini, L., Morellec, E., Schroth, E., and Valta, P., forthcoming in the Review of Financial Studies. Please read it before using the contents of this package.

This package includes the following files or folders:

1.	01_GMMSV_RFS_sample_format.do, the STATA code that downloads the Compustat data and
	1.i		outputs the file `GMMSV_CFdata_estimation.dta’, which contains the firms’ cash flows time series exported to Matlab for estimation of the cash flow model parameters, mu, rho, sigma_P and sigma_A;
	1.ii	reads the group-specific estimates and merges them with firm-specific data. The output is the STATA file `GMMSV_reg_sample.dta’.

2.	02_GMMSV_RFS_MatlabCode_ParameterEstimation, the folder containing the set of Matlab codes to estimate the cash flow model parameters. The routines included are: 
	2.i	cols.m;	2.ii	diagrv.m;
	2.iii	estimation_sequential_industries.m; the code to execute (invokes all other routines);
	2.iv	gradp.m;
	2.v	loglike_model_cash_flow_reparam_alpha_sigmaA_rho_mv.m;
	2.vi	loglike_model_cash_flow_reparam_mv.m;
	2.vii	loglike_model_cash_flow_timeseries_mv.m;
	2.viii	param_convert_reparam_true_alpha_sigmaA_rho.m;
	2.ix	param_convert_reparam_true.m;
	2.x	param_convert_true_reparam.m;
	2.xi	rows.m.

3.	03_GMMSV_RFS_sample_merge_descriptive_stats.do, reads the group-specific estimates and merges them with firm-specific data. The output is the STATA file `GMMSV_reg_sample.dta’ and Table 1;

4.	04_GMMSV_RFS_cash_sensitivity.do, which produces the analysis of the savings sensitivity ion cash flow and cash flow shocks (Table 8);

5.	05_GMMSV_RFS_equityissuance_regressions.do, which produces the analysis of equity issuance and cash flow risk (Table 9);

6.	06_GMMSV_RFS_debtandequityissuance_regressions.do, which produces the analysis of debt and equity issuance and cash flow risk (Table 10);

7.	07_GMMSV_RFS_descriptives.do, which produces the descriptive analysis in Tables 3, 4, 5, 6, and 11. This code also exports the data needed to generate Figure 5 using the following Matlab code:

8.	Figure5RhoDistributionFF17.m

For any other material in the paper, please contact the authors directly.